{load header}
<!--/H-->
    <!-- 内容区 -->
    <div id="main-content">
        <div id="top-alert" class="fixed alert alert-error" style="display: none;">
            <button class="close fixed" style="margin-top: 4px;">&times;</button>
            <div class="alert-content">这是内容</div>
        </div>
        <div id="main" class="main">
            
            <!-- nav -->
                        <!-- nav -->
            

 	<div class="main-title">
        <h2>用户列表</h2>
    </div>           
	
	<div class="cf">
            [ 
		<!--{if ($_star == '') }-->
		<strong>全部</strong>
		<!--{else}-->
		<a  href="{eval echo site_url('community/member')}">全部</a> 
		<!--{/if}-->
		<!--{if ($_star == 1)}-->
		<strong>普通用户</strong>
		<!--{else}-->
		<a  href="{eval echo site_url('community/member')}?star=1">普通用户</a> 
		<!--{/if}-->
		<!--{if ($_star == 2)}-->
		<strong>明星用户</strong>
		<!--{else}-->
		<a href="{eval echo site_url('community/member')}?star=2">明星用户</a>
		<!--{/if}-->
                <!--{if ($_star == 3)}-->
		<strong>作家</strong>
		<!--{else}-->
		<a href="{eval echo site_url('community/member')}?star=3">作家</a>
		<!--{/if}-->
		]
	
		<!-- 高级搜索 -->
		<div class="search-form fr cf">
		<div class="sleft">
				<div class="drop-down">
					<span id="sch-sort-txt" class="sort-txt" data="{if $icon_type}{$icon_type}{else}1{/if}">{if $icon}{$icon}{else}用户名/ID{/if}</span>
					<i class="arrow arrow-down"></i>
					<ul id="sub-sch-menu" class="nav-list hidden">
                                            <li><a href="javascript:;" value="1">用户名/ID</a></li>
                                            <li><a href="javascript:;" value="2">手机号</a></li>
					</ul>
				</div>
				<input type="text" name="q" class="search-input" value="{$keyword}" placeholder="请输入关键词">
				<a class="sch-btn" href="javascript:;" id="search" url=""><i class="btn-search"></i></a>
			</div>
		</div>
	</div>
	<div class="data-table table-striped">
		<table>
			<thead>
				<tr>
					<th>ID</th>
					<th>用户名</th>
                                        <th>昵称</th>
                                        <th>手机号</th>
                                        <th>会员等级</th>                                       
                                        <th>关注总数</th>
                                        <th>粉丝总数</th>
                                        <th>帖子总数</th>
                                        <th>收藏总数</th>
                                        <th>回复数</th>
                                        <th>角色标识</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<!--{loop $list $val}-->
				<tr>
					
					<td>{$val['user_id']}</td>
					<td>{$val['username']}</td>
                                        <td><a href="{$val['space_url']}" target="_blank">{$val['nickname']}</a></td>
                                        <td>{$val['mobile']}</td>
                                        <td>{$val['level']}</td>
                                        <td>{$val['following_count']}</td>
                                        <td>{$val['fans_count']}</td>
                                        <td>{$val['articles_count']}</td>
                                        <td>{$val['favor_count']}</td>
                                        <td>{$val['reply_count']}</td>
                                        <td>{$val['major']}</td>
					<td>
					    <a title="修改" href="{eval echo site_url('community/member_edit')}?user_id={$val['user_id']}">修改</a>
                                            <a title="权限" href="{eval echo site_url('community/member_permission')}?user_id={$val['user_id']}">权限</a>
                                            <a title="通知" href="{eval echo site_url('community/member_letter')}?user_id={$val['user_id']}">通知</a>
					</td>
				</tr>
				<!--{/loop}-->
			</tbody>
		</table>
		<!-- 分页 -->
	    <div class="page">
	        <div>
			{$showpage}
			<span class="rows">共 {$Total} 条记录</span>
			</div>
		</div>
	</div>
<link href="{eval echo base_url()}static/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="{eval echo base_url()}static/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="{eval echo base_url()}static/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="{eval echo base_url()}static/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>	
<script type="text/javascript">
$(function(){
	//搜索功能
	$("#search").click(function(){
		var url = $(this).attr('url');
		var status = $("#sch-sort-txt").attr("data");
        var query  = $('.search-form').find('input').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
        query = query.replace(/^&/g,'');
		if(status != ''){
			query += '&st=' + status ;
        }
        if( url.indexOf('?')>0 ){
            url += '&' + query;
        }else{
            url += '?' + query;
        }
		window.location.href = url;
	});

	/* 状态搜索子菜单 */
	$(".search-form").find(".drop-down").hover(function(){
		$("#sub-sch-menu").removeClass("hidden");
	},function(){
		$("#sub-sch-menu").addClass("hidden");
	});
	$("#sub-sch-menu li").find("a").each(function(){
		$(this).click(function(){
			var text = $(this).text();
			$("#sch-sort-txt").text(text).attr("data",$(this).attr("value"));
			$("#sub-sch-menu").addClass("hidden");
		})
	});

    //回车自动提交
    $('.search-form').find('input').keyup(function(event){
        if(event.keyCode===13){
            $("#search").click();
        }
    });

    $('#time-start').datetimepicker({
        format: 'yyyy-mm-dd',
        language:"zh-CN",
	    minView:2,
	    autoclose:true
    });

    $('#datetimepicker').datetimepicker({
       format: 'yyyy-mm-dd',
        language:"zh-CN",
        minView:2,
        autoclose:true,
        pickerPosition:'bottom-left'
    })
    
})
</script>
	
	
			</div>
	</div>
<!--F-->{load footer}